import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { MemberCardService } from './member-card.service';
import { CreateMemberCardDto } from './dto/create-member-card.dto';
import { UpdateMemberCardDto } from './dto/update-member-card.dto';

@Controller('member-card')
export class MemberCardController {
  constructor(private readonly memberCardService: MemberCardService) {}

  @Post()
  create(@Body() createMemberCardDto: CreateMemberCardDto) {
    return this.memberCardService.create(createMemberCardDto);
  }

  @Get()
  findAll() {
    return this.memberCardService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.memberCardService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateMemberCardDto: UpdateMemberCardDto) {
    return this.memberCardService.update(+id, updateMemberCardDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.memberCardService.remove(+id);
  }
}
